﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GGTest
{
    public partial class addContact : Form
    {
        public addContact()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            DialogResult = System.Windows.Forms.DialogResult.Cancel;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int aaa;
            if (int.TryParse(textBox1.Text, out aaa))
                DialogResult = System.Windows.Forms.DialogResult.OK;
            else
                MessageBox.Show("Wprowadź poprawną liczbę");
        }

        public int uin
        {
            get { return int.Parse(textBox1.Text); }
        }
    }
}
